package com.kingyea.app.market.market.dao;

import com.kingyea.app.market.market.bean.Market;
import com.kingyea.app.market.market.bean.MarketVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * @author
 * @version v1.0.0
 * @description MarketMapper
 * @date Created in 2018-02-10 16:12:20
 */
public interface MarketMapper {

    /**
     * 通过ID获取对象
     */
    Market getById(@Param("marketCode") String marketCode);

    /**
     * 通过ID删除对象
     */
    void deleteById(@Param("marketCode") String marketCode);

    /**
     * 更新对象
     */
    void update(Map<String, Object> obj);

    /**
     * 保存对象
     */
    void save(Map<String, Object> Object);

    /**
     * 查询列表
     */
    List<Object> list(Map<String, Object> obj);

    List<Market> getMarketByUser(@Param("loginAccount") String loginAccount);

    List<MarketVo> getListBySupplier(Map<String, Object> obj);

    /**
     * 通用查询方法
     *
     * @param map
     * @return java.util.List<com.kingyea.app.market.market.bean.Market>
     * @author Mr.Lin
     * @date 2018/3/27 9:33
     */
    List<Market> queryList(Map<String, Object> map);

    /**
     * 根据appCode查询其覆盖市场
     *
     * @param appCode
     * @return java.util.List<com.kingyea.app.market.market.bean.Market>
     * @author Mr.Lin
     * @date 2018/3/27 9:33
     */
    List<Market> queryListByAppCode(String appCode);
}
